home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / Perl5 / ext / MacPerl / Makefile < prev    next >
Encoding:
Makefile  |  1995-10-26  |  5.7 KB  |  205 lines  |  [TEXT/MPS ]

  1. # This Makefile is for the DynaLoader extension to perl.
  2. #
  3.  
  4. # --- MakeMaker post_initialize section:
  5.  
  6.  
  7. # --- MakeMaker constants section:
  8.  
  9. NAME = MacPerl
  10.  
  11. # Perl library to use when building the extension
  12. PERL_LIB = :::lib:
  13.  
  14. # Where is the perl source code located? (Eventually we should
  15. # be able to build extensions without requiring the perl source
  16. # but that's a way off yet).
  17. PERL_SRC = :::
  18. # Perl header files (will eventually be under PERL_LIB)
  19. PERL_INC = :::
  20. # Perl binaries
  21. PERL = :::miniperl
  22.  
  23. # FULLEXT = Pathname for extension directory (eg DBD/Oracle).
  24. # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
  25. # ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD)
  26. FULLEXT = MacPerl
  27. BASEEXT = MacPerl
  28. ROOTEXT = 
  29.  
  30. # Source code:
  31. XS= MacPerl.xs
  32. C = MacPerl.c
  33. H = 
  34.  
  35. PPCEXT = .c.o.PPC
  36. PPCOBJ = MacPerl{PPCEXT} OSA{PPCEXT} XL{PPCEXT}
  37. M68KEXT = .c.o.68K
  38. M68KOBJ = MacPerl{M68KEXT} OSA{M68KEXT} XL{M68KEXT}
  39.  
  40. # This extension may link to it's own library (see SDBM_File)
  41. PPC_Sys_Libraries = ":::PLib:Perl.xcoff" ∂
  42.                      "{PPCLibraries}"InterfaceLib.xcoff ∂
  43.                     "{PPCLibraries}"MathLib.xcoff ∂
  44.                     "{PPCLibraries}"StdCLib.xcoff ∂
  45.                     "{PPCLibraries}"StdCRuntime.o ∂
  46.                     "{PPCLibraries}"PPCCRuntime.o
  47.                     
  48. PPC_Lib_Equates = -l InterfaceLib.xcoff=InterfaceLib ∂
  49.                   -l MathLib.xcoff=MathLib ∂
  50.                   -l StdCLib.xcoff=StdCLib ∂
  51.                   -l Perl.xcoff=Perl ∂
  52.                   -l {BASEEXT}.xcoff={BASEEXT} 
  53.  
  54. # Where is the Config.pm that we are using/depend on
  55. CONFIGDEP = {PERL_ARCHLIB}Config.pm
  56.  
  57. # Where to put things:
  58. INST_LIBDIR     = {PERL_LIB}{ROOTEXT}
  59. INST_AUTODIR     = {PERL_LIB}auto:{FULLEXT}:
  60.  
  61. INST_BOOT    = {INST_AUTODIR}{BASEEXT}.bs
  62. INST_DYNAMIC = {INST_AUTODIR}{BASEEXT}
  63. INST_STATIC  = {BASEEXT}.o
  64. INST_PM          = {INST_LIBDIR}MacPerl.pm
  65.  
  66.  
  67. # These definitions are from config.mac (via :::lib:Config.pm)
  68. PerlOption    = -sym on -d MULTIPLICITY -d DEBUGGING
  69. COptions     = -mc68020 -model far
  70. PPCCOptions = -d macintosh -d __useAppleExts__
  71. LOptions     = -mf -w
  72. ROptions     = -i :
  73. CC68K         = MWC68K {PerlOption}
  74. CCPPC         = MWCPPC {PerlOption}
  75.  
  76. # Usage: {AUTOSPLITFILE} FileToSplit AutoDirToSplitInto
  77. AUTOSPLITFILE = {PERL} -I{PERL_LIB} -e 'use AutoSplit; AutoSplit::autosplit_file(${ARGV}[0], ${ARGV}[1], 0, 1, 1) ;'
  78.  
  79.  
  80. # --- MakeMaker tool_xsubpp section:
  81.  
  82. XSUBPP = {PERL_SRC}ext:xsubpp
  83. XSUBPPDEPS = {PERL_SRC}ext:typemap typemap
  84. XSUBPPARGS = -typemap {PERL_SRC}ext:typemap
  85.  
  86.  
  87. # --- MakeMaker tools_other section:
  88.  
  89. # The following is a portable way to say mkdir -p
  90. MKPATH = {PERL} -wle '$"="/"; foreach $p (@ARGV){ my(@p); foreach(split(/:/,$p)){ push(@p,${_}); next if -d "@p"; print "mkdir @p"; mkdir("@p",0777)||die $! }} exit 0;'
  91.  
  92.  
  93. # --- MakeMaker c_o section:
  94.  
  95. .c.o.68Kƒ    .c
  96.     {CC68K} {COptions} -i {PERL_INC} {INC} {Default}.c -o {Default}.c.o.68K
  97. .c.o.PPCƒ    .c
  98.     {CCPPC} {PPCCOptions} -i {PERL_INC} {INC} {Default}.c -o {Default}.c.o.PPC
  99.  
  100.  
  101. # --- MakeMaker xs_c section:
  102.  
  103. .c ƒ .xs
  104.     {PERL} {XSUBPP} {XSUBPPARGS} {Default}.xs >{Default}.c
  105.  
  106.  
  107. # --- MakeMaker top_targets section:
  108.  
  109. all ƒ static {INST_PM}
  110.  
  111. install ƒ all
  112.  
  113. # --- MakeMaker static section:
  114.  
  115. # {INST_PM} has been moved to the all: target.
  116. # It remains here for awhile to allow for old usage: "make static"
  117. static ƒ {INST_STATIC}.PPC {INST_STATIC}.68K {INST_PM} 
  118.  
  119. {INST_STATIC}.PPCƒ {PPCOBJ}
  120.     MWLinkPPC -sym on -o {INST_STATIC}.PPC -xm library {PPCOBJ}
  121. {INST_STATIC}.68Kƒ {M68KOBJ}
  122.     MWLink68K -sym on -o {INST_STATIC}.68K -xm library {M68KOBJ}
  123.     
  124. # --- MakeMaker dynamic section:
  125.  
  126. # {INST_PM} has been moved to the all: target.
  127. # It remains here for awhile to allow for old usage: "make dynamic"
  128. dynamic ƒ {BASEEXT} {INST_PM} 
  129.     :::miniperl -e 'mkdir "'{INST_AUTODIR}'", 0777 unless -d "'{INST_AUTODIR}'"'
  130.     Duplicate -y {BASEEXT} {INST_DYNAMIC}
  131.     
  132. {BASEEXT} ƒ {PPCOBJ}
  133.     MWLinkPPC -t shlb -c cfrg -main boot_Fcntl -export all -o {BASEEXT} -xm sharedLibrary {PPCOBJ} {PPC_Sys_Libraries}
  134. # --- MakeMaker installpm section:
  135.  
  136. # installpm: MacPerl.pm => {INST_LIBDIR}MacPerl.pm, splitlib={INST_LIBDIR}
  137.  
  138. {INST_LIBDIR}MacPerl.pmƒ MacPerl.pm
  139.     Delete -i -y {INST_LIBDIR}MacPerl.pm
  140.     Duplicate MacPerl.pm {INST_LIBDIR}MacPerl.pm
  141.     {AUTOSPLITFILE} {INST_LIBDIR}MacPerl.pm {INST_LIBDIR}auto
  142.  
  143.  
  144. clean ƒ
  145. #    rm -f *~ t/*~ *.o *.a mon.out core so_locations {BOOTSTRAP} {BASEEXT}.bso
  146.  
  147.  
  148. # --- MakeMaker realclean section:
  149.  
  150. # Delete temporary files (via clean) and also delete installed files
  151. #realclean purge ::  clean
  152. #    rm -f Makefile {INST_DYNAMIC} {INST_STATIC} {INST_BOOT} {INST_PM}
  153. #    rm -rf {INST_AUTODIR} {INST_ARCHAUTODIR}
  154.  
  155.  
  156. # --- MakeMaker distclean section:
  157.  
  158. # distclean:     clean
  159. #     @:
  160. #     rm -f ./Makefile
  161. # #     cd ..; tar cvf {DISTNAME}-{VERSION}.tar {BASEEXT}
  162. #    cd ..; compress {DISTNAME}-{VERSION}.tar
  163. #     @:
  164.  
  165.  
  166. # --- MakeMaker test section:
  167.  
  168. # test :: all
  169. #     @echo 'No tests defined for {NAME} extension.'
  170.  
  171.  
  172. # --- MakeMaker install section:
  173.  
  174. # install :: all
  175.     # install is not defined. Makefile, by default, builds the extension
  176.     # directly into {INST_LIB} so "installing" does not make much sense.
  177.     # If INST_LIB is in the perl source tree then installperl will install
  178.     # the extension when it installs perl.
  179.  
  180.  
  181. # --- MakeMaker force section:
  182. # Phony target to force checking subdirectories.
  183. # FORCE:
  184.  
  185.  
  186. # --- MakeMaker perldepend section:
  187.  
  188. PERL_HDRS = {PERL_INC}EXTERN.h {PERL_INC}INTERN.h ∂
  189.     {PERL_INC}XSUB.h    {PERL_INC}av.h    {PERL_INC}cop.h ∂
  190.     {PERL_INC}cv.h    {PERL_INC}dosish.h    {PERL_INC}embed.h ∂
  191.     {PERL_INC}form.h    {PERL_INC}gv.h    {PERL_INC}handy.h ∂
  192.     {PERL_INC}hv.h    {PERL_INC}keywords.h    {PERL_INC}mg.h ∂
  193.     {PERL_INC}op.h    {PERL_INC}opcode.h    {PERL_INC}patchlevel.h ∂
  194.     {PERL_INC}perl.h    {PERL_INC}perly.h    {PERL_INC}pp.h ∂
  195.     {PERL_INC}proto.h    {PERL_INC}regcomp.h    {PERL_INC}regexp.h ∂
  196.     {PERL_INC}scope.h    {PERL_INC}sv.h    {PERL_INC}unixish.h ∂
  197.     {PERL_INC}util.h
  198.  
  199. # {OBJECT} ƒ {PERL_HDRS}
  200.  
  201. # --- MakeMaker postamble section:
  202.  
  203.  
  204. # End.
  205.